-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix: past spikes were not cleared in NEURON VectorSpikeSource #610
base: master
Are you sure you want to change the base?
Conversation
1 similar comment
Upon calling clear_past_spikes() the spike vector was resized, but readout of those spike times by the VecStim mechanism was not re-initialized. This caused the indexing calculation in VecStim to go wrong resulting in erroneous spike timings.
I fixed a more serious bug that is more insidious and took me a while to track down. Basically the spikes coming out of a VectorSpikeSource are not valid anymore after you write out data during a simulation. This is because the Vector containing the spikes was resized, but the VecStim mechanism did not adjust its indexing calculation. Caused me a lot of headaches and lost simulation data so hope this gets merged quickly! |
Many thanks for this. Please could you add tests for the two issues you've identified here? (in the file |
Uh-oh, seems like it is not fixed yet. VecStim does not reset the index to the correct value when calling play() again. I need to modify the VecStim mechanism to reset the index properly. |
This fixed a bug for me when writing out data during a simulation. Without this line, spikes were not cleared and in
recorder._get_current_segment
an error was raised when constructing aneo.SpikeTrain
containing spike times <= recording start time.